#coding=utf-8
"""
Author:林怡
Time:2025/5/6 17:13
"""

'''
此模块是用来封装读取ini文件的工具类

'''
import sys
sys.path.append('..')
from configparser import ConfigParser
from config.config import *

class Read_Ini(ConfigParser):
    def __init__(self,filename):
        super(Read_Ini,self).__init__() #继承父类的构造方法
        self.read(filename)  #读取ini文件

    def read_data_ini(self,section=None,option=None):
        '''封装一个获取section下面对应的option的value值'''
        value = self.get(section,option)
        return value

file = os.path.join(data_path,'data.ini')
read = Read_Ini(file)
url = read.read_data_ini('test_data','url')
# print(url)
































